package org.codeart.chainrespon.example01;

public class HandlerA extends Handler {

    @Override
    public void handle(RequestData data) {
        System.out.printf("Handler A 执行代码逻辑: %s\n", data.getData());
        data.setData(data.getData().replace("A", ""));
        // 判断是否向后执行
        if (successor != null) {
            successor.handle(data);
        } else {
            System.out.println("执行终止");
        }
    }
}
